18. Deploying a Training/Testing Regime
Deploying a Training/Testing Regime
Question:
Now you’ll add in training and testing, so that you get a trustworthy accuracy number. Use the train_test_split validation available in sklearn.cross_validation ; hold out 30% of the data for testing and set the random_state parameter to 42 (random_state controls which points go into the training set and which are used for testing; setting it to 42 means we know exactly which events are in which set, and can check the results you get). What’s your updated accuracy?
Start Quiz:

INSTRUCTOR NOTE:
Make sure to fit the data on the training set and assess the accuracy on the test set.